export default {
    data() {
        return {
           
        }
    },
    methods: {
        isValidRightRQ(idCard) {
            //按照身份证获取性别
            if (idCard.length == 18) {
                if (idCard.substring(14, 17) % 2 == 0) {
                    return '女';
                } else {
                    return '男';
                }
            }
            if (idCard.length == 15) {
                if (idCard.substring(14, 15) % 2 == 0) {
                    return '女';
                } else {
                    return '男';
                }
            }
        },
        GetBirthdayByIdCardNo(idCard) {
            //按照身份证号获取出生日期
            if (idCard.length == 18) {
                return this.GetBirthdayByIdCardNo18(idCard);
            }
            if (idCard.length == 15) {
                return this.GetBirthdayByIdCardNo15(idCard);
            }
        },
        GetBirthdayByIdCardNo18(idCard18) {
            var year = idCard18.substring(6, 10);
            var month = idCard18.substring(10, 12);
            var day = idCard18.substring(12, 14);
            return year + '-' + month + '-' + day;
        },
        GetBirthdayByIdCardNo15(idCard15) {
            var year = idCard15.substring(6, 8);
            var month = idCard15.substring(8, 10);
            var day = idCard15.substring(10, 12);
            return "19" + year + '-' + month + '-' + day;
        },
        gisLocation(type, selectItems) {
            window.parent.window.CIframeMessage({
                func: "ganzhiDinwei",
                data: {
                    selectItems: selectItems,
                    type: type
                }
            })
        }
    }
}
